<?php
/**
 * Created by PhpStorm.
 * User: coolinmind
 * Date: 07/11/2018
 * Time: 14:41
 */

namespace App\Modules\Finance;
use App\Modules\AdapterApi;
use App\Services\Finance\RecordIndex;

class Record extends AdapterApi
{
    public function Record()
    {
        $data = pick_array($this->postData, ['record','token']);
        return RecordIndex::Record()->record($data);
    }

    public function addCost()
    {
        $data = pick_array($this->postData, ['type', 'amount', 'remark', 'date']);
        return RecordIndex::Record()->addCost($data);
    }

    public function addStatistics()
    {
        $data = $this->postData;
        return RecordIndex::Record()->addStatistics($data);
    }

    public function costList()
    {
        $data = $this->postData;
        return RecordIndex::Record()->costList($data);
    }

    public function costStatistics()
    {
        $data = $this->postData;
        return RecordIndex::Record()->costStatistics($data);
    }

    public function costByMonth()
    {
        $data = $this->postData;
        return RecordIndex::Record()->costByMonth($data);
    }

    public function financeAddSp()
    {
        $data = $this->postData;
        return RecordIndex::Record()->financeAddSp($data);
    }

    public function delSp()
    {
        $data = $this->postData;
        return RecordIndex::Record()->delSp($data);
    }

    public function addOne()
    {
        $data = $this->postData;
        return RecordIndex::Record()->addOne($data);
    }

    public function spList()
    {
        return RecordIndex::Record()->spList();
    }

    public function spIncomeList()
    {
        return RecordIndex::Record()->spIncomeList();
    }

    public function spInputPrepare()
    {
        $data = $this->postData;
        return RecordIndex::Record()->spInputPrepare($data);
    }

    public function spSubmit()
    {
        $data = $this->postData;
        return RecordIndex::Record()->spSubmit($data);
    }

    public function delInputById()
    {
        $data = $this->postData;
        return RecordIndex::Record()->delInputById($data);
    }

    public function incomeStatistics()
    {
        return RecordIndex::Record()->incomeStatistics();
    }
}